<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>首页 - 博客</title>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
  <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>

<body>

  <!-- 导航 -->
  <nav class="navbar navbar-expand-lg navbar-light bg-light">
    <a class="navbar-brand" href="#">博客网站</a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarNav">
      <ul class="navbar-nav">
        <li class="nav-item"><a class="nav-link" href="index.html">首页</a></li>
        <li class="nav-item"><a class="nav-link" href="category.html">分类</a></li>
        <li class="nav-item"><a class="nav-link" href="about.html">关于</a></li>
        <li class="nav-item"><a class="nav-link" href="contact.html">联系</a></li>
        <li class="nav-item"><a class="nav-link" href="login.html">登录</a></li>
      </ul>
    </div>
  </nav>

  <!-- 轮播图 -->
  <div id="carouselExampleSlidesOnly" class="carousel slide" data-bs-ride="carousel">
    <div class="carousel-inner">
      <div class="carousel-item active">
        <img src="http://cdn.qiniu.liyansheng.top/img/20241202214546.png" class="d-block w-100" alt="Slide 1">
      </div>
      <div class="carousel-item">
        <img src="http://cdn.qiniu.liyansheng.top/img/20241202213616.png" class="d-block w-100" alt="Slide 2">
      </div>
      <!-- 可以加更多图片 -->
    </div>
  </div>


  <!-- 文章列表 -->
  <div class="container mt-5">
    <div class="row">
      <div class="col-md-4 mb-4">
        <div class="card" data-bs-toggle="tooltip" title="点击查看文章详情">
          <img src="http://cdn.qiniu.liyansheng.top/img/20241202213616.png" class="card-img-top" alt="文章封面">
          <div class="card-body">
            <h5 class="card-title">文章标题1</h5>
            <p class="card-text">文章摘要内容...</p>
            <a href="detail.html" class="btn btn-primary">阅读更多</a>
          </div>
        </div>
      </div>
      <div class="col-md-4 mb-4">
        <div class="card" data-bs-toggle="tooltip" title="点击查看文章详情">
          <img src="http://cdn.qiniu.liyansheng.top/img/20241202213616.png" class="card-img-top" alt="文章封面">
          <div class="card-body">
            <h5 class="card-title">文章标题1</h5>
            <p class="card-text">文章摘要内容...</p>
            <a href="detail.html" class="btn btn-primary">阅读更多</a>
          </div>
        </div>
      </div>
      <div class="col-md-4 mb-4">
        <div class="card" data-bs-toggle="tooltip" title="点击查看文章详情">
          <img src="http://cdn.qiniu.liyansheng.top/img/20241202213616.png" class="card-img-top" alt="文章封面">
          <div class="card-body">
            <h5 class="card-title">文章标题1</h5>
            <p class="card-text">文章摘要内容...</p>
            <a href="detail.html" class="btn btn-primary">阅读更多</a>
          </div>
        </div>
      </div>
      <div class="col-md-4 mb-4">
        <div class="card" data-bs-toggle="tooltip" title="点击查看文章详情">
          <img src="http://cdn.qiniu.liyansheng.top/img/20241202213616.png" class="card-img-top" alt="文章封面">
          <div class="card-body">
            <h5 class="card-title">文章标题1</h5>
            <p class="card-text">文章摘要内容...</p>
            <a href="#" class="btn btn-primary">阅读更多</a>
          </div>
        </div>
      </div>
      <div class="col-md-4 mb-4">
        <div class="card" data-bs-toggle="tooltip" title="点击查看文章详情">
          <img src="http://cdn.qiniu.liyansheng.top/img/20241202213616.png" class="card-img-top" alt="文章封面">
          <div class="card-body">
            <h5 class="card-title">文章标题1</h5>
            <p class="card-text">文章摘要内容...</p>
            <a href="#" class="btn btn-primary">阅读更多</a>
          </div>
        </div>
      </div>
      <div class="col-md-4 mb-4">
        <div class="card" data-bs-toggle="tooltip" title="点击查看文章详情">
          <img src="http://cdn.qiniu.liyansheng.top/img/20241202213616.png" class="card-img-top" alt="文章封面">
          <div class="card-body">
            <h5 class="card-title">文章标题1</h5>
            <p class="card-text">文章摘要内容...</p>
            <a href="#" class="btn btn-primary">阅读更多</a>
          </div>
        </div>
      </div>
      <!-- 更多文章卡片 -->
    </div>
  </div>


  <!-- 引入Bootstrap JS -->
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.4/dist/umd/popper.min.js"></script>

  <!-- jQuery 代码 -->
  <script>
    $(document).ready(function () {
      // 鼠标悬停卡片，显示更多信息
      $(".card").hover(function () {
        $(this).find(".card-text").slideToggle();
      });

      // 点击导航，显示提示信息
      $(".nav-link").click(function () {
        var text = $(this).text();
        alert("您点击了：" + text);
      });

      // 启用Bootstrap Tooltip
      var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
      var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
        return new bootstrap.Tooltip(tooltipTriggerEl);
      });

      // 轮播图自动播放
      var myCarousel = document.querySelector('#carouselExampleSlidesOnly');
      var carousel = new bootstrap.Carousel(myCarousel, {
        interval: 2000,  // 每隔2秒切换
        ride: 'carousel' // 自动播放
      });
    });
  </script>

</body>

</html>